<div class="container">	
<style>
.wx-name{font-size:12px;margin:5px 0;height:32px;overflow:hidden;line-height:16px;}
.video-height img{height:95px;}
.wx-img{width:80px;height:80px;}
</style>
	<div class="row">		
		<div class="col-md-8" style="display: block;">
	<form class="form-inline" role="form" method="get">
		<div class="form-group">
      		<input class="form-control" style="width:360px;" value="<?php echo $_GET['wd'];?>" name="wd" placeholder="请输入搜索词">
      		<input class="form-control" type="submit" value="搜索">
		</div>
	<div class="form-group">
		<label class="radio inline"><input type="radio" {{if empty($_REQUEST['t']) || $_REQUEST['t']=='name'}} checked="checked"{{/if}} value="name" name="t">搜标题</label>
		<label class="radio inline"><input {{if $_REQUEST['t']=='all'}} checked="checked" {{/if}} type="radio" value="all" name="t">搜全文</label>&nbsp;&nbsp;
		<!--
		<label class="checkbox inline"><input {{if $_REQUEST['m']}} checked="checked" {{/if}} type="checkbox" value="1" name="m">模糊搜索</label>&nbsp;&nbsp;
		<label class="checkbox inline"><input {{if $_REQUEST['syn']}} checked="checked" {{/if}} type="checkbox" value="1" name="syn">近义词</label>&nbsp;&nbsp;
		-->
		<select size="1" name="sort">
			<option {{if empty($_REQUEST['sort']) || $_REQUEST['sort']=='view_nums'}} selected="selected"{{/if}} value="view_nums">按阅读数排序</option>
			<option {{if $_REQUEST['sort']=='time'}} selected="selected"{{/if}} value="time">按时间排序</option></select>
	</div>
	</form>
		<hr>
		<p> 热门搜索词: {{loop $hotquery $word $num}}
			{{if $word == 'video_iframe'}}<a href="/search/index?wd={{urlencode($word)}}&t=all">视频文章</a>{{else}}<a href="/search/index?wd={{urlencode($word)}}">{{$word}}</a>{{/if}}
			</a> &nbsp; {{/loop}} </p>
		<hr>
		{{if $wx_list}}
			<div class="row">
			{{loop $wx_list $wx_item}} 
				<div class="col-xs-2">
					<a target="_blank" href="{{$this->Html->url('/wxes/'.($wx_item['Wx']['slug']?$wx_item['Wx']['slug']:$wx_item['Wx']['id']))}}"><img class="img-circle wx-img img-responsive" src="{{$this->Html->url($wx_item['Wx']['coverimg']?$wx_item['Wx']['coverimg']:'/img/nophoto-wx.jpg')}}" title="{{$wx_item['Wx']['name']}}"></a>
					<p class="wx-name text-center"><a target="_blank" href="{{$this->Html->url('/wxes/'.($wx_item['Wx']['slug']?$wx_item['Wx']['slug']:$wx_item['Wx']['id']))}}">{{$wx_item['Wx']['name']}}</a></p>
				</div>
			{{/loop}}
			{{if $search_wxtotal > 12 }}
				<div  style="clear:both;float:right;"><a class="btn btn-sm btn-default" href="/search/index/Wx?wd=<?php echo $_GET['wd'];?>">查看更多公众号搜索结果</a></div>
			{{/if}}
			</div>
		{{/if}}
			<portlet portlet="default"  title="搜索文章：{{$wd}}">
<?PHP if($total>0){ ?>
<ul class="clearfix ui-portlet-list">
    <?PHP 

    $region_control_name = Inflector::tableize($search_model);
    foreach($data_list as $item) {
    	$item = $item[$search_model];
		$item['slug'] = $item['slug']?$item['slug']:$item['id'];
    ?>
		{{template regions/_list}}			
	<?php } ?>
</ul>
	{{$page_navi}}
<?php } ?>
			</portlet>
		</div>
		<div class="col-md-4">
			<portlet  title="{{lang('Hot Articles')}}" list_tpl="regions/_titlelist" limit="8" ulclass="portlet-title-list" model="Article" recursive="-1" order="view_nums desc" info="recursive=-1&fields[0]=Article.name&fields[1]=Article.slug&fields[2]=Article.created&fields[3]=Article.id&order=view_nums desc"></portlet>
		</div>
	</div>
</div>
